#!/bin/bash -ex

git clone --depth 1 https://github.com/trailofbits/codereason
cd codereason
find . -type f -exec sed -i 's:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain::g' {} \;
./install_vex.sh
# This step fails in travis-ci because of CMake 3.2 not finding Boost, while docker has CMake 2.8 which finds Boost just fine
./make.sh
cd ..

mkdir -p bin
cd bin
ln -s ../codereason/build/bin/* .
cd ..
